<template>
	<view class="item" @click="goDetail(dataItem.parentId,keyword)">
		<rich-text  :nodes="dataItem.desc" class="desc" />
		<view  v-if="dataItem.source!=undefined" class="source">来源：{{dataItem.source}}</view>
	</view>
</template>

<script>
	export default {
		props: {
			dataItem: {
				type: Object,
				default: undefined
			},
			keyword:
				{
				    type:String,
					default:''
				}
		},
		methods:{
			goDetail(id,keyword){
			    console.log("keyword",keyword);
				uni.navigateTo({
					url:`/pages/search/searchKeyDetail?id=${id}&keyword=${keyword}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.item{
		border-bottom: 2upx solid #f1f1f1;
		padding-top: 30upx;
		padding-bottom: 10upx;
	}
	.desc {
		font-size: 28upx;
		color: #333333;
		// padding-top: 40upx;
		// padding-bottom: 20upx;
		&-light {
			color: #f1685d;
		}
	}

	.type {
		color: #5ea1f8;
	}

	.source {
		font-size: 24upx;
		color: #999999;
		padding-bottom: 40upx;
	}
</style>
